package com.mvc.web.common.utils;


/**
 * Description: 
 * All Rights Reserved.
 * @version 1.0  2015-2-6 下午4:11:03 
 */
public class EnumUtils {

	public static enum EmployeeStatus{
		CREATE_ALREADY("已新建",0),START_ALREADY("已启用",1), STOP_ALREADY("已停用",2);
		private String name;
		private int index;
		EmployeeStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(int index){
			for(EmployeeStatus es : EmployeeStatus.values()){
				if(es.getIndex() == index){
					return es.getName();
				}
			}
			return null;
		}
	}
	
	public static enum BusinessVerifyStatus{
		WAIT_VERIFY("待审核",0),ALREADY_VERIFY("审核通过",1), NOTPASS_VERIFY("审核未通过",2),DEL_ALREADY("已删除",3);
		private String name;
		private int index;
		BusinessVerifyStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(String index){
			for(BusinessVerifyStatus es : BusinessVerifyStatus.values()){
				if(es.getIndex()== Integer.parseInt(index)){
					return es.getName();
				}
			}
			return null;
		}
	}
	
	public static enum DeliverStatus{
		CREATE_ALREADY("已新建",0),START_ALREADY("在职",1), STOP_ALREADY("离职",2),DELETE_ALREADY("已删除",3);
		private String name;
		private int index;
		DeliverStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(int index){
			for(DeliverStatus es : DeliverStatus.values()){
				if(es.getIndex() == index){
					return es.getName();
				}
			}
			return null;
		}
	}
	
	public static enum BusinessSnackVerifyStatus{
		NEW_ADD("已新建",0),WAIT_VERIFY("待审核",1),ALREADY_VERIFY("审核通过",2), NOTPASS_VERIFY("审核未通过",3),DEL_ALREADY("已删除",4);
		private String name;
		private int index;
		BusinessSnackVerifyStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(String index){
			for(BusinessSnackVerifyStatus es : BusinessSnackVerifyStatus.values()){
				if(es.getIndex()== Integer.parseInt(index)){
					return es.getName();
				}
			}
			return null;
		}
	}
	
	public static enum BusinessSnackTypeStatus{
		COOL("凉菜",0),CHUANXIANG("川湘菜",1),HUO_GUO("火锅",2),
		GAN_GUO("干锅",3),SHAO_KAO("烧烤",4),HU_XIAN("河海湖鲜",5),
		YUE_CAI("粤菜",6),XICAN("西餐",7),TE_SE("特色小吃",8);
		private String name;
		private int index;
		BusinessSnackTypeStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(Integer index){
			for(BusinessSnackTypeStatus es : BusinessSnackTypeStatus.values()){
				if(es.getIndex()== index){
					return es.getName();
				}
			}
			return null;
		}
	}
	
	public static enum OrderStatus{
		COOL("已新建",0),CHUANXIANG("已下发",1),HUO_GUO("已发货",2),
		GAN_GUO("已完成",3),SHAO_KAO("已取消",4),HU_XIAN("已退货",5);
		
		private String name;
		private int index;
		OrderStatus(String name,int index){
			this.name = name;
			this.index = index;
		}
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		
		public static String getNameByIndex(String status){
			for(OrderStatus es : OrderStatus.values()){
				if(es.getIndex()==Integer.parseInt(status)){
					return es.getName();
				}
			}
			return null;
		}
	}
}
